package com.dljd.javase.t6;


import java.util.Arrays;

/*
数组的帮助类知识案例
 */
public class ArraysDemo {
    public static void main(String[] args) {

        int[]  nums={234,45,56,4,23,46,324};
        Arrays.sort(nums);
        System.out.println(Arrays.toString(nums));

        int n=Arrays.binarySearch(nums,56);
        System.out.println(n);
        Arrays.fill(nums,88);
        System.out.println(Arrays.toString(nums));


        int[] newNums=Arrays.copyOf(nums,3);
        System.out.println(Arrays.toString(newNums));

        int[] newNums1=Arrays.copyOfRange(nums,3,5);
        System.out.println(Arrays.toString(newNums1));
    }
}
